package testing;

import javax.swing.JFrame;

import vis.KeyPanel;

import logic.English;
import logic.PlayfairCipher;

public class Test2 {

	public static void main(String[] args) {
		JFrame frame = new JFrame("Playfair");
		PlayfairCipher pfEn = new PlayfairCipher(new English(), "PlayfairExample");
		KeyPanel kp = new KeyPanel(pfEn, false);
		frame.add(kp);
		frame.pack();
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setVisible(true);
		
		//kp.setHighlight(1, 0, 2, 2);
		//kp.setHHighlight(2, 1, 2, 4, false);
		//kp.setHighlight(3, 4, 1, 2);
		String cip = pfEn.cipherString("Hide the gold in the tree stump");
		//pfEn.playback(kp, 1000);
		System.out.println("Cipher : " + cip);
		pfEn.decipherString(cip);
		pfEn.playback(kp, 1000);
	}

}
